package com.chenglai.pay.feign;

import com.chenglai.commonutils.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;

/**
 * 类描述：
 *
 * @Author rxh
 * @Date 2023/11/21 15:00
 */
@FeignClient(value = "order", fallbackFactory = OrderFallback.class)
public interface OrderService {


    @PostMapping(value = "/order/updateOrderStatus")
    Result updateOrderStatus(@RequestParam("orderNum") String orderNum, @RequestParam("status") Integer status,
                             @RequestParam("transactionId") String transactionId);

    @PostMapping(value = "/order/updateOrderRefundStatus")
    Result updateOrderRefundStatus(@RequestParam("transactionId") String transactionId, @RequestParam("status") Integer status);

    @GetMapping(value = "/order/queryOrderFrom")
    Integer queryOrderFrom(@RequestParam("orderNum") String orderNum);

    @GetMapping(value = "/order/detailByGroupOn")
    Map<String, Object> detailByGroupOn(@RequestParam("orderNum") String orderNum);

}
